package com.kunkun.auth.api;

import com.kunkun.auth.entity.AuthUserDTO;
import com.kunkun.auth.entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

    /**
     * 用户服务feign
     *
     */
    //这个注解声明了一个 Feign 客户端，
    // kunkun-auth-dev 是被调用微服务的名称。Feign 将使用这个名称来查找服务实例（通常通过服务发现机制，如 Eureka 或 Consul）。
    @FeignClient("kunkun-auth-dev")//
    public interface UserFeignService {

        @RequestMapping("/user/getUserInfo")
        Result<AuthUserDTO> getUserInfo(@RequestBody AuthUserDTO authUserDTO);

        @RequestMapping("/user/listByIds")
        Result<List<AuthUserDTO>> listUserInfoByIds(@RequestBody List<String> userNameList);

    }



